-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(eventing): Emit new annotations_staged_change event #570
Conversation
3f3f513
to
c8e00f4
Compare
[setActiveAnnotationIdAction.toString()]: handleActiveAnnotationEvents, | ||
[setIsInitialized.toString()]: handleAnnotationsInitialized, | ||
[setStagedAction.toString()]: handleSetStagedAction, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to handle setStatusAction
? Or can it even take the place of setStagedAction
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should stick to setStagedAction
since the transitions in state for staged
allows us to infer the event status as well as the annotation type
if (prevStaged === null && nextStaged !== null) { | ||
status = 'create'; | ||
} | ||
|
||
if (prevStaged !== null && nextStaged !== null) { | ||
status = 'update'; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we handle if (prevStaged !== null && nextStaged === null)
? Maybe states is cancel
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left it off since our pattern of usage for cancel
is to use resetCreatorAction
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests?
c8e00f4
to
c2c0e20
Compare
c2c0e20
to
71220ef
Compare
TODO: